projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03f9f87
)
Allow icons to be specified by number.
author
robertl
<robertl>
Fri, 20 Aug 2004 07:06:24 +0000
(07:06 +0000)
committer
robertl
<robertl>
Fri, 20 Aug 2004 07:06:24 +0000
(07:06 +0000)
mapsource.c
patch
|
blob
|
history
diff --git
a/mapsource.c
b/mapsource.c
index facc98b179ca255393e1a6a032e61f680df16f4d..3ffd5279854f9c2025fa8e924b5ad11a34ed650c 100644
(file)
--- a/
mapsource.c
+++ b/
mapsource.c
@@
-183,10
+183,20
@@
mps_find_icon_number_from_desc(const char *desc, garmin_formats_e garmin_format)
{
icon_mapping_t *i;
int def_icon = DEFAULTICONVALUE;
+ int n;
if (!desc)
return def_icon;
+ /*
+ * If we were given a numeric icon number as a description
+ * (i.e. 8255), just return that.
+ */
+ n = atoi(desc);
+ if (n) {
+ return n;
+ }
+
for (i = icon_table; i->icon; i++) {
if (case_ignore_strcmp(desc,i->icon) == 0) {
switch (garmin_format) {